#include <iomanip>
#include <iostream>
using namespace std;

int main()
{
	int x, y, b = 0, t = 0;
	cin >> x >> y;
	b = 3 * x - y;
	t = y - 2 * x;
	cout << b << " " << t;
	return 0;
}